package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Destination;
import cn.wolfcode.wolf2w.domain.Strategy;
import cn.wolfcode.wolf2w.domain.StrategyCatalog;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

public interface StrategyCatalogRepository extends MongoRepository<StrategyCatalog,String> {

    /**
     * 查询攻略分类中的目的地信息
     * @return
     */
    List<StrategyCatalog> queryByDestName(String destName);

    /**
     * 以目的地的名称去查询攻略分类的名称
     * @param destName
     * @return
     */
    List<StrategyCatalog> queryByName(String destName);


    @Query("select destName from StrategyCatalog destName")
    public List<StrategyCatalog> findAllT();

    /**
     * 以目的地的id去查询攻略分类
     * @param destId
     * @return
     */
    List<StrategyCatalog> queryByDestId(String destId);
}
